# 新建学生类，并统计学生人数
class Student(object):
    count = 0
    def __init__(self, name):
        self.__name = name
        Student.count += 1
        self.stucount()
    # 设置姓名
    def set_name(self,name):
        self.__name = name
    # 获取姓名
    def get_name(self):
        return self.__name
    def stucount(self):
        print('{}: {}'.format('学生总人数为', Student.count))
stu1 = Student('小红')
stu2 = Student('小白')
stu3 = Student('小黑')